//下拉列表
$(function() {

	$('#serviceone').selectlist({
		zIndex: 10,
		width: 250,
		height: 40,
		onChange: function() {
			var jsonVal = JSON.parse($('._all_array_apis').val())[$('#serviceone li.selected').attr('data-value')]; // 获取json
			//字符串拼接 S			
			if(location.search){
			var strarr = ['<div class="_service_change_val"><select class="_service_api_option" id="servicetwo">'];				
			}else{
			var strarr = ['<div class="_service_change_val"><select class="_service_api_option" id="servicetwo"><option value="0">全部</option>'];				
			}

			for(var k in jsonVal) {
				strarr.push('<option value="' + k + '">' + jsonVal[k] + '</option>')
			}
			strarr.push('<div id="api_options"></div></select></div>')
				//字符串拼接 N
				//将拼接好的字符串给 _service_change_val
			$('._service_change_val').html(strarr.join(''));
			//渲染
			$('#servicetwo').selectlist({
				zIndex: 10,
				width: 250,
				height: 40
			});
		}
	});

	$('#servicetwo').selectlist({
		zIndex: 10,
		width: 250,
		height: 40
	});

	$('#servicethree').selectlist({
		zIndex: 10,
		width: 250,
		height: 40
	});
})